package com.kate.mall.product.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 商品货品表
 * 
 * @author kate-chan
 * @email 857782993@qq.com
 * @date 2022-12-06 23:21:04
 */
@Data
@TableName(value = "pms_goods_product",autoResultMap = true)
@Accessors(chain = true)
public class GoodsProductEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@ApiModelProperty(value = "")
	@TableId
	private Integer id;
	/**
	 * 商品表的商品ID
	 */
	@ApiModelProperty(value = "商品表的商品ID")
	private Integer goodsId;
	/**
	 * 商品规格值列表，采用JSON数组格式
	 */
	@ApiModelProperty(value = "商品规格值列表，采用JSON数组格式")
	@TableField(typeHandler = com.kate.mall.common.typehandler.Json2StringTypeHandler.class)
	private String[] specifications;
	/**
	 * 商品货品价格
	 */
	@ApiModelProperty(value = "商品货品价格")
	private BigDecimal price;
	/**
	 * 商品货品数量
	 */
	@ApiModelProperty(value = "商品货品数量")
	private Integer number;
	/**
	 * 锁定库存数量
	 */
	@ApiModelProperty(value = "锁定库存数量")
	private Integer lockStock;
	/**
	 * 商品货品图片
	 */
	@ApiModelProperty(value = "商品货品图片")
	private String url;
	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date addTime;
	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date updateTime;
	/**
	 * 逻辑删除
	 */
	@ApiModelProperty(value = "逻辑删除")
	private Integer deleted;

}
